import { createApp } from "vue";
import App from "@/App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
//@ts-ignore 忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from "element-plus/dist/locale/zh-cn.mjs"; // 引入中文语言包
import "virtual:svg-icons-register"; // 引入svg注册脚本
import gloablComponent from "@/components/index.ts"; // 全局注册组件
// 引入全局样式文件
import "@/styles/index.scss";
// 引入路由
import router from "@/router/index.ts";
// 引入pinia
import pinia from "@/store/index.ts";
// 引入路由鉴权文件
import "./router/permission.ts";
// elementPlus css变量
import "element-plus/theme-chalk/dark/css-vars.css";
// 自定义颜色变量文件
import "@/styles/dark.scss";

const app = createApp(App); // 创建应用实例
app.use(gloablComponent);
app.use(router);
app.use(pinia);
// 全局注册ElementPlus及设置中文语言包
app.use(ElementPlus, {
  locale: zhCn,
});
app.mount("#app");
